<?php
defined('IN_DESTOON') or exit('Access Denied');

/**
 * 20180323 模板调用标题，默认调用title
 * @param $t
 * @param string $type
 */
function title($t, $type = 'title')
{
    switch ($type) {
        case 'headline':
            echo $t['headline'] == '' ? $t['title'] : $t['headline'];
            break;
        case 'subhead':
            echo $t['subhead'] == '' ? $t['title'] : $t['subhead'];
            break;
        case 'mobtitle':
            echo $t['mobtitle'] == '' ? $t['title'] : $t['mobtitle'];
            break;
        default:
            echo $t['title'];
            break;
    }
}

?>